package com.example.mifi;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.net.wifi.ScanResult;
import android.net.wifi.WifiManager;
import android.util.Log;

public class WifiReceiver extends BroadcastReceiver 
{
	WifiManager m_wifi;
	MapView m_view;
    
    HashMap<String, ArrayList<String>> m_hmals;
    
	public WifiReceiver(WifiManager wifi, MapView mapView) 
	{
		m_wifi = wifi;
		m_view = mapView;
	}
	
	@Override
	public void onReceive(Context context, Intent intent) 
	{
		List<ScanResult> list = m_wifi.getScanResults();
		m_view.locate(list);
		m_wifi.startScan();
	}
}
